'use strict'

import React, { useState } from 'react'
import './index.less'
function Box(props) {
    const [range, setRange] = useState('week');
    const { title, height = '100%', children, margin, overflow, subtitle, subtitleSelect } = props

    return (
        <div style={{ height, width: '100%', margin: margin || "0px 0px 28px" }}>
            <div style={{
                height: height, listStyle: 'none', overflow: overflow || 'hidden',

            }}>
                <div className='box_header_bg'  >
                    <span className='card-title'>{title}</span>



                    {subtitleSelect && <div className='subtitle_' style={{ textAlign: 'right' }}>
                        {subtitleSelect}
                    </div>}
                </div>
                <div className='children-container'>
                    {children}
                </div>
            </div>
        </div>
    )
}

export default Box

